import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type HouseDocument = House & Document;

@Schema({ timestamps: true })
export class House {
  @Prop({ required: true })
  botTag: string;

  @Prop({ required: true })
  detailsTag: string;

  @Prop({ required: true })
  href: string;

  @Prop({ required: true })
  zuInfo: string;

  @Prop({ required: true })
  placeName: string;

  @Prop({ required: true })
  money: string;

  @Prop({ required: true })
  detail: string;

  @Prop({ required: true })
  placeLink: string;

  @Prop({ required: true })
  downloadTimeStr: string;

  @Prop({ required: true })
  downloadTimeLocale: string;

  @Prop({ required: true })
  timestamp: number;
}

export const HouseSchema = SchemaFactory.createForClass(House);